import request from '@/axios/request';
import url from '@/axios/url';
const { wmsUrl, adminUrl } = url();
// 导出url
export const exportUrl = `${wmsUrl}wmsReceiveNoticeOrderScan/export`
// 分页查询
export function getList(params = {}) {
  return request({
    url: `${wmsUrl}wmsReceiveNoticeOrderScan`,
    method: 'get',
    params,
  });
}
// 新增
export function rowCreate(data = {}) {
  return request({
    url: `${wmsUrl}wmsReceiveNoticeOrderScan`,
    method: 'post',
    data,
  });
}
export function getPushStatus() {
  return request({
    url: `${adminUrl}dict/type/wms_push_status`,
    method: "get",
  });
}

// 修改
export function rowUpdate(data = {}) {
  return request({
    url: `${wmsUrl}wmsReceiveNoticeOrderScan`,
    method: 'put',
    data,
  });
}
// 删除
export function rowDel(id) {
  return request({
    url: `${wmsUrl}wmsReceiveNoticeOrderScan/${id}`,
    method: 'put',
  });
}
// 详情
export function rowDetail(id) {
  return request({
    url: `${wmsUrl}wmsReceiveNoticeOrderScan/info/${id}`,
    method: 'get',
  });
}

// 导入用户
export function importData (data = {}) {
  return request({
    url: `${wmsUrl}wmsReceiveNoticeOrderScan/import`,
    method: 'POST',
    data,
    headers: {
      'Content-Type': 'multipart/form-data',
    }
  })
}
// 下载模板
export const downloadTemplateUrl = `${wmsUrl}wmsReceiveNoticeOrderScan/template`
// 获取仓库信息
export function getCurrentWarehouseCode() {
  return request({
    url: `${wmsUrl}basic`,
    method: 'get',
  });
}

// 查询库区列表
export function getAreaCodeList(params = {}) {
  return request({
    url: `${adminUrl}baseArea/list`,
    method: "get",
    params,
  });
}
